import request from './public'

// 游戏专区-商品列表
export const getAllGoods = (params) => {
  return request.post('/web/search', params)
}

// 游戏代练-商品列表
export const getAllLevelingGoods = (params) => {
  return request.post('/web/levelingsearch', params)
}

//根据条件查询商品
export const getGoodsByParam = (params) => {
	return request.get('/web/search',params)
}
// 游戏专区- 商品详情
export const productDet = (params) => {
  return request.post('/goods.getdetail', params)
}

// 代练-商品详情
export const levelingproductDet = (params) => {
  return request.post('/goods.getlevelingdetail', params)
}

/**
 * 生成支付二维码（模式一）并在页面上显示
 */
export const scanCode = (params) => {
  return request.post('/api/wxpay/scanCode1', params)
}
/**
 * 扫码支付模式二
 * 已测试
 */
export const scanCode2 = (params) => {
  return request.post('/api/wxpay/scanCode2', params)
}

/**
 * 扫码支付模式一回调
 * 已测试
 */
export const wxpay = (params) => {
  return request.post('/api/wxpay/wxpay', params)
}
/**
 * 刷卡支付
 * 已测试
 */
export const micropay = (params) => {
  return request.post('/api/wxpay/micropay', params)
}
/**
 * 获取联系方式
 * @param params
 * @returns {*|void|AxiosPromise}
 */
export const getContactInfo = (params) => {
  return request.get('/api/single/home/contactInfo', params)
}
